package com.forum.exception;

import com.forum.result.ResultCodeEnum;

/**
 * @ClassName myException
 * @Description TODO
 * @Author suyao
 * @Version 1.0
 */
public class myException extends RuntimeException{
    private ResultCodeEnum resultCodeEnum;
    private Integer code;
    private String O;

    public myException(String var1, Throwable var2) {
        super(var1, var2);
        this.O = var1;
    }

    public myException(String var1) {
        super(var1);
        this.O = var1;
    }

    public myException(Throwable var1) {
        super(var1);
    }

    public myException(ResultCodeEnum var1) {
        super(var1.getMessage());
        this.resultCodeEnum = var1;
        this.code = var1.getCode();
        this.O = var1.getMessage();
    }

    public myException(Integer var1, String var2) {
        super(var2);
        this.code = var1;
        this.O = var2;
    }
    public ResultCodeEnum getResultCodeEnum() {
        return resultCodeEnum;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.O;
    }

    public Throwable fillInStackTrace() {
        return this;
    }
}
